package com.caishi.lkx.exam.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.zzw.common.entity.impl.BaseEntity;
import com.zzw.common.service.model.NameModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.List;
import java.util.Map;

/**
 * @author by Janisa
 * @Description: 考试规则
 * @date 2022/3/7 16:25
 */
@Schema(title = "试卷")
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "ex_exam_paper_rule", autoResultMap = true)
public class PaperRuleModel extends BaseEntity<PaperRuleModel> implements NameModel<PaperRuleModel, String>{
    /**
     * 规则名称
     */
    private String name;
    /**
     * 备注
     */
    private String remark;
    /**
     * 学科
     */
    @TableField(value = "categories",typeHandler = JacksonTypeHandler.class)
    private List<Map<String,Object>> categories;
    /**
     * 总分
     */
    private Integer totalScore;
    /**
     * 及格分
     */
    private Integer passScore;
    /**
     * 试题数量
     */
    private Integer questionTotal;
    /**
     * 内容
     */
    @TableField(value = "content",typeHandler = JacksonTypeHandler.class)
    private List<Map<String,Object>> content;

    @Schema(title = "最后操作者名字",hidden = true)
    @TableField(exist = false)
    private String finalModifyUserName;

}
